export const enum Role {
  None = 0,
  Student = 1 << 0,
  Teacher = 1 << 1,
  Admin = 1 << 2,
  All = Student | Teacher | Admin
}

export function roleIsEnabled(current: number, target: number) {
  return target === Role.None || (current & target) !== 0
}
